import {useNavigate} from 'react-router-dom'

function Login() {
    const navigate = useNavigate()

    function goAbout() {
        navigate('/about?id=1001', {replace: true})
    }

    function goAbout2() {
        navigate('/about2/1001', {replace: true})
    }

    return (<div>login
        <button onClick={goAbout}>跳转</button>
        <button onClick={goAbout2}>跳转2</button>
    </div>)
}

export default Login